package counter.com.configuration;

import counter.com.common.ProductServiceInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

//@Component
public class ProductServiceInterceptorAppConfig extends WebMvcConfigurationSupport {
    static final String PASSURL = "/userinfo/login";
    @Autowired
    ProductServiceInterceptor productServiceInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(productServiceInterceptor).addPathPatterns("/**").excludePathPatterns(PASSURL);
    }
}
